/*
 * EchoParseCase.cpp
 *
 *  Created on: 2012-12-24
 *      Author: yangentao@gmail.com
 */

#include "test.h"
#include "../src/ftp/EchoParse.h"

using namespace yet;
using namespace ftp;
TEST(EchoParse, a) {
	string s = "200 OK\n300 bad\n400-abc\n500 test\n400 end\n";

	EchoParse p;
	p.parse(s);

	EXPECT_EQ(p.size(), 3);
	EXPECT_EQ(p.getCode(0), 200);
	EXPECT_EQ(p.getCode(1), 300);
	EXPECT_EQ(p.getCode(2), 400);

}

